package com.cloud.listener;

public enum EventType {

    EMAIL("email","邮件推送");


    private String code;
    private String desc;

    EventType(String code, String desc) {
        this.code = code;
        this.desc = desc;
    }

    public static EventType toEnum(String code) {
        for (EventType category : EventType.values()) {
            if (category.getCode().equals(code)) {
                return category;
            }
        }
        return null;
    }



    public String getCode() {
        return code;
    }

    public void setCode(String code) {
        this.code = code;
    }

    public String getDesc() {
        return desc;
    }

    public void setDesc(String desc) {
        this.desc = desc;
    }
}
